<?php
require_once WEB_ROOT. '/application/library/Bus.php';

class Bus_Module extends Bus {
    protected $_name = "modules";
    
    protected function _init() {
        
    }
    public function getItemById($id){
        $Dtos = $this->select(array(
            'where'  => "idmodules='{$id}'"
        ));
        if(count($Dtos) > 0){
            return $Dtos[0];
        }
        return false;
    }
    public function getItemByName($name){
        $Dtos = $this->select(array(
            'where'  => "modules_name='{$name}'"
        ));
        if(count($Dtos) > 0){
            return $Dtos[0];
        }
        return false;
    }  
}
?>